package com.yshye.adapter.wiki;

import java.util.ArrayList;
import java.util.List;

public class Client {

	public static void main(String[] args) {
		LogModel lModel= new LogModel();
		lModel.setLogid("0001");
		lModel.setOperateUser("叶院生");
		lModel.setOperateContent("在吃晚饭");
		lModel.setOperateTime("2016-10-21 23:12:22");
		
		List<LogModel> list = new ArrayList<LogModel>();
		list.add(lModel);
		// 创建操作日志的文件对象
		LogFileOperateApi api = new LogFIleOpeate("/Users/JsonYe/Documents/java/Log.text");
//		
//		//保存日志文件
//		api.writeLogFile(list);
//		//读取日志文件
//		List<LogModel> readLog = api.readLogFile();
//		System.out.println("日志："+readLog);
		
		
		LogDBOperateApi api2 = new Adapter(api);
//		api2.createLog(lModel);
		api2.removeLog(lModel);
		System.err.println("log:"+api2.getAll());
	}
}
